<?php
class CourseTypeController extends AdminBaseController {
	public function lists(){
		return HttpServerManager::getCourseTypeServer()->pagingBySearch($_GET);
	}
	public function add(){
		$data =  array();
		if (!empty($_GET['id'])){
			$data = HttpDaoManager::getCourseTypeDao()->get($_GET['id']);
		}
		//$data['pic'] = HttpServerManager::getUploadServer()->eosUploadShow('pic', Common::getStrValue($data, 'pic'));
		$ueditor = ClassManager::getUeditor();
		$data['ueditor'] = $ueditor->ueditor();
		$data['content'] = $ueditor->ueditors('content',Common::getStrValue($data, 'content'));
		$data['type1'] = Common::_t('course_type_type');
		$data['course_type1'] = Common::_t('course_type');
		$data['status1'] = Common::_t('course_type_status');
		
		return $data;
	}
	public function subAdd(){
		HttpDaoManager::getCourseTypeDao()->add($_POST);
		ClassManager::getToos()->msgbox('添加成功');
	}
	public function subUpdate(){
		HttpDaoManager::getCourseTypeDao()->update($_POST,$_POST['id']);
		ClassManager::getToos()->msgbox('修改成功','CourseType_lists.html');
	}
	public function delete(){
		HttpServerManager::getCourseTypeServer()->deleteBatchByid($_GET['id']);
		ClassManager::getToos()->msgbox("删除成功");
	}
}
?>